home *** CD-ROM | disk | FTP | other *** search
Makefile | 1990-08-24 | 7.5 KB | 216 lines |
- # Makefile for fileutils
- # Copyright (C) 1986, 1988, 1989 Free Software Foundation, Inc.
-
- # This program is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation; either version 1, or (at your option)
- # any later version.
-
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
-
- # You should have received a copy of the GNU General Public License
- # along with this program; if not, write to the Free Software
- # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- # MS-DOS port (c) 1990 by Thorsten Ohl, td12@ddagsi3.bitnet
- #
- # To this port, the same copying conditions apply as to the
- # original release.
- #
- # IMPORTANT:
- # This file is not identical to the original GNU release!
- # You should have received this code as patch to the official
- # GNU release.
- #
- # MORE IMPORTANT:
- # This port comes with ABSOLUTELY NO WARRANTY.
- #
- # $Header: e:/gnu/fileutil/RCS/makefile.'v 1.3.0.6 90/06/29 00:50:58 tho Stable $
- #
- # This makefile is tailored for an **IX compatible make and the
- # Microsoft C Compiler Version 5.1.
-
- CC = cl
- LINK = link
-
- # Things you might add to CFLAGS:
- # -DSTDC_HEADERS If you have ANSI C headers and libraries.
- # -D_POSIX_SOURCE If you have POSIX.1 headers and libraries.
- # -DSIGTYPE=int If your signal handlers return int, not void.
- # -DUSG System V strings, headers, ndir.h.
- # -DDIRENT If you have dirent.h.
- # -DSYSNDIR Old Xenix systems (selects sys/ndir.h).
- # -DINT_16_BITS On machines where sizeof long > sizeof int.
- # -DHPUX_NFS_BUG On HP/UX (6.5 at least) where NFS files have
- # reported blocksizes twice the correct size.
- # -DVPRINTF_MISSING If you lack vprintf function (but have _doprnt).
- # -DMKDIR_MISSING If you lack mkdir and rmdir system calls.
- # -DFCHMOD_MISSING If you lack fchmod system call.
- # -DRENAME_MISSING If you lack rename system call.
- # -DFTRUNCATE_MISSING If you lack ftruncate system call.
- # -DSTBLOCKS_MISSING If your `struct stat' lacks st_blocks and st_blksize.
-
- # For System V, add -DUSG to CFLAGS, and -DBLKSIZE=1024
- # (or some other number which is the optimal blocksize for filesys i/o ops).
- # On V.3, add -DUSGr3 as well (this selects dirent.h instead of ndir.h).
- # Add -DSYSNDIR if your system uses sys/ndir.h instead of ndir.h.
- # On HP/UX, add -DDIRSIZ_MACRO (for ndir.h).
- # Add -DNEED_MKDIR if your system lacks the mkdir and rmdir system calls.
- # Add -DVPRINTF to use vfprintf instead of _doprnt (which seems to be
- # broken on the sparc).
-
- INSTALL = cp -v
-
- CFLAGS = -Ox -DUSG -DBLKSIZE=0x4000 -DVPRINTF -W3 -DUTIMES_MISSING\
- -DFCHMOD_MISSING -DSTDC_HEADERS -DINT_16_BITS
- LDFLAGS = /e/noe
- SSTACK = /st:0x4000
- BSTACK = /st:0x8000
- LIBOBJS = getopt.obj getopt1.obj
- LIBS = $(LIBOBJS:.obj=) e:\libs\msc\setargv
- DIRLIB = msd_dir.obj
- PWDLIB = msd_pwd.obj
-
- # Where to install the executables
- BIN = c:/bin
-
- # Executable files in this directory
- PROGS = cat.exe cmp.exe dd.exe head.exe tail.exe ls.exe rm.exe cp.exe \
- mv.exe mkdir.exe rmdir.exe chmod.exe tac.exe
-
- # one of these is enough: ls.exe vdir.exe dir.exe
- # makes no ense under MS-DOS: ln.exe mkfifo.exe
- # We did not try the following yet: create.exe ginstall.exe du.exe
-
- # Sources
- SRC = argmatch.c backupfi.c cat.c chmod.c cmp.c cp-aux.c cp-hash.c cp.c \
- create.c dd.c dirlib.c du.c eaccess.c error.c filebloc.c \
- filemode.c getopt.c getopt1.c getversi.c glob.c head.c install.c \
- ln.c ls.c mkdir.c mkfifo.c modechan.c msd_dir.c msd_pwd.c mv.c \
- mv_dir.c regex.c rm.c rmdir.c savedir.c tac.c tail.c \
-
- INC = backupfi.h cp.h getopt.h modechan.h msd_dir.h msd_pwd.h regex.h \
- system.h
-
- # Version of fileutils release
- VERSION = 1.3
-
- all: $(PROGS)
-
- $(PROGS): $(LIBOBJS)
-
- # Linking rules
-
- cat.exe: cat.obj error.obj $(LIBOBJS)
- $(LINK) $(LDFLAGS) $(BSTACK) cat error $(LIBS), $@;
-
- chmod.exe: chmod.obj modechan.obj filemode.obj error.obj savedir.obj \
- $(DIRLIB) $(LIBOBJS)
- $(LINK) $(LDFLAGS) $(BSTACK) chmod modechan filemode error savedir \
- $(DIRLIB) $(LIBS), $@;
-
- cmp.exe: cmp.obj error.obj $(LIBOBJS)
- $(LINK) $(LDFLAGS) $(SSTACK) cmp error $(LIBS), $@;
-
- cp.exe: cp.obj cp-hash.obj cp-aux.obj eaccess.obj error.obj backupfile.obj \
- getversion.obj argmatch.obj savedir.obj $(DIRLIB) $(PWDLIB) $(LIBOBJS)
- # $(LINK) $(LDFLAGS) $(BSTACK) cp cp-hash cp-aux eaccess \
- # error backupfile getversion argmatch savedir \
- # $(LIBS) $(DIRLIB) $(PWDLIB), $@;
- $(LINK) @cp.lnk
- create.exe: create.obj modechange.obj dirlib.obj error.obj $(DIRLIB) $(LIBOBJS)
- $(LINK) $(LDFLAGS) $(BSTACK) create modechange dirlib error
- $(LIBS) $(DIRLIB), $@;
-
- dd.exe: dd.obj error.obj
- $(LINK) $(LDFLAGS) $(BSTACK) dd error, $@;
-
- dir.exe: dir.obj filemode.obj glob.obj error.obj argmatch.obj fileblocks.obj \
- $(DIRLIB) $(PWDLIB) $(LIBOBJS)
- $(LINK) $(LDFLAGS) $(BSTACK) dir filemode glob error argmatch \
- fileblocks $(LIBS) $(DIRLIB) $(PWDLIB), $@;
-
- du.exe: du.c
- $(CC) $(CFLAGS) -Fe$@ du.c $(LIBS) -link $(LDFLAGS) $(BSTACK)
-
- ginstall: install.obj dirlib.obj error.obj $(LIBOBJS)
- $(LINK) $(LDFLAGS) $(BSTACK) install dirlib error $(LIBS), $@;
-
- head.exe: head.obj error.obj $(LIBOBJS)
- $(LINK) $(LDFLAGS) $(BSTACK) head error $(LIBS), $@;
-
- ln.exe: ln.c
- $(CC) $(CFLAGS) -Fe$@ ln.c $(LIBS) -link $(LDFLAGS) $(BSTACK)
-
- ls.exe: ls.obj filemode.obj glob.obj error.obj argmatch.obj fileblocks.obj \
- $(DIRLIB) $(PWDLIB) $(LIBOBJS)
- $(LINK) $(LDFLAGS) $(BSTACK) ls filemode glob error \
- argmatch filebloc $(LIBS) $(DIRLIB) $(PWDLIB), ls.exe;
-
- mkdir.exe: mkdir.obj error.obj $(LIBOBJS)
- $(LINK) $(LDFLAGS) $(BSTACK) mkdir error $(LIBS), $@;
-
- mv.exe: mv.obj eaccess.obj error.obj backupfile.obj getversion.obj \
- argmatch.obj $(DIRLIB) $(PWDLIB) $(LIBOBJS)
- # $(LINK) $(LDFLAGS) $(BSTACK) mv error eaccess backupfi getversi \
- # argmatch $(DIRLIB) $(PWDLIB) $(LIBS), $@;
- $(LINK) @mv.lnk
- rm.exe: rm.obj eaccess.obj error.obj $(DIRLIB) $(PWDLIB) $(LIBOBJS)
- $(LINK) $(LDFLAGS) $(BSTACK) rm eaccess error \
- $(LIBS) $(DIRLIB) $(PWDLIB), $@;
-
- rmdir.exe: rmdir.obj error.obj $(LIBOBJS)
- $(LINK) $(LDFLAGS) $(BSTACK) rmdir error $(LIBS), $@;
-
- tac.exe: tac.obj error.obj regex.obj $(LIBOBJS)
- $(LINK) $(LDFLAGS) $(BSTACK) tac error regex $(LIBS), $@;
-
- tail.exe: tail.obj error.obj $(LIBOBJS)
- $(LINK) $(LDFLAGS) $(BSTACK) tail error $(LIBS), $@;
-
- vdir.exe: vdir.obj filemode.obj glob.obj error.obj argmatch.obj \
- fileblocks.obj $(DIRLIB) $(PWDLIB) $(LIBOBJS)
- $(LINK) $(LDFLAGS) $(BSTACK) vdir filemode glob error \
- argmatch fileblocks $(LIBS) $(DIRLIB) $(PWDLIB), $@;
-
- # Compilation rules
-
- cat.obj chmod.obj: system.h
- chmod.obj create.obj mkdir.obj mkfifo.obj modechange.obj: modechange.h
- cp.obj mv.obj ln.obj backupfile.obj getversion.obj: backupfile.h
- eaccess.obj cp.obj cp-hash.obj cp-aux.obj: cp.h msd_pwd.h msd_dir.h
- tac.obj regex.obj: regex.h
- getopt1.obj: getopt.h
- head.obj: system.h msd_dir.h
-
- msd_dir.obj system.h: msd_dir.h
- msd_pwd.obj: msd_pwd.h
-
- dir.obj: ls.c
- $(CC) $(CFLAGS) -DMULTI_COL -c ls.c
- mv ls.obj dir.obj
-
- vdir.obj: ls.c
- $(CC) $(CFLAGS) -DLONG_FORMAT -c ls.c
- mv ls.obj vdir.obj
-
- install: $(PROGS)
- $(INSTALL) $(PROGS) $(BIN)
-
- clean:
- del *.exe *.obj
- rcsclean *.c *.h makefile
-
- zip:
- pkzip -frp fileutil
-
- disk:
- copy fileutil.zip b:/v
- pkunzip -t b:fileutil | grep -vw OK
-
- tags: $(SRC) $(INC)
- etags -t *.h *.c